package com.cloudkinto.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 * @author hua
 * @since 2024-12-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_stock_history_detail")
public class StockHistoryDetailDo extends Model<StockHistoryDetailDo> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("tenant_id")
    private Long tenantId;

    @TableField("company_id")
    private Long companyId;

    @TableField("date")
    private LocalDate date;

    @TableField("wh_id")
    private Long whId;

    @TableField("order_type")
    private String orderType;

    @TableField("order_id")
    private Long orderId;

    @TableField("sku")
    private String sku;

    @TableField("stock_attribute")
    private Integer stockAttribute;

    /**
     * 1产品库存 2箱库存
     */
    @TableField("type")
    private Integer type;

    @TableField("quantity")
    private Integer quantity;

    @TableField("age")
    private Integer age;

    @TableField("height")
    private BigDecimal height;

    @TableField("width")
    private BigDecimal width;

    @TableField("length")
    private BigDecimal length;

    @TableField("weight")
    private BigDecimal weight;

    @TableField("height_bs")
    private BigDecimal heightBs;

    @TableField("width_bs")
    private BigDecimal widthBs;

    @TableField("length_bs")
    private BigDecimal lengthBs;

    @TableField("weight_bs")
    private BigDecimal weightBs;

    /**
     * 总体积
     */
    @TableField("volume")
    private Double volume;

    @TableField("cal_volume")
    private Double calVolume;

    @TableField("unit_rent_fee")
    private Double unitRentFee;

    /**
     * 计算单位 0立方米/天  1立方英尺/天
     */
    @TableField("calculate_unit")
    private Integer calculateUnit;

    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
